package com.letv.so.constants;

import java.util.Properties;

import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PropertiesLoaderUtils;

/**
 * 记录媒资单视频映射关系
 */
public class PlayStreamsMapping {

    public static Properties PLAYSTREAMS_PROPERTIES = new Properties();

    static {
        try {
            Resource resource = new ClassPathResource("/playstreams.properties");
            PlayStreamsMapping.PLAYSTREAMS_PROPERTIES = PropertiesLoaderUtils.loadProperties(resource);
        } catch (Exception e) {
            PlayStreamsMapping.PLAYSTREAMS_PROPERTIES = new Properties();
        }
    }

    public static void main(String[] args) {
        System.out.println(PlayStreamsMapping.PLAYSTREAMS_PROPERTIES.getProperty("252009"));
    }
}
